package com.sright.bcard.enterprise.dal.dao;

import com.sright.bcard.common.service.share.base.dao.BaseDAO;
import com.sright.bcard.common.service.share.dto.page.BetweenDateParamRequest;
import com.sright.bcard.common.service.share.dto.page.PageParamRequest;
import com.sright.bcard.enterprise.dal.entity.EnterpriseDO;
import com.sright.bcard.enterprise.dal.entity.ext.EnterpriseExtraDO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface EnterpriseDAO extends BaseDAO<EnterpriseDO> {

    int deleteByPrimaryKey(Integer id);

    EnterpriseDO selectByMobile(String mobile);

    List<EnterpriseDO> selectByEnterpriseIdList(List<Long> enterpriseIdList);

    Integer countOfEnterpriseExtra(@Param("keyword") String keyword, @Param("status") Integer status,
                                   @Param("between") BetweenDateParamRequest betweenDateParamRequest, Date currentDate);

    List<EnterpriseExtraDO> selectPageOfEnterpriseExtra(@Param("keyword") String keyword,
                                                        @Param("status") Integer status,
                                                        @Param("between") BetweenDateParamRequest betweenDateParamRequest,
                                                        @Param("page") PageParamRequest pageParamRequest, Date currentDate);
    List<EnterpriseDO> selectEnterpriseList();

    List<EnterpriseDO> selectExpireListByDate(Date beginDate, Date endDate);

    Integer onStatus(EnterpriseDO enterpriseDO);

    List<EnterpriseDO> selectExpireListByCreateDate(Date beginDate, Date endDate);
}
